<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Events.aspx.cs" Inherits="FreeLancer.HRB.WebApp.Admin.Pages.Events" Title="<%$ Resources:labels, events %>" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.1, Version=8.1.1.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.1, Version=8.1.1.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
  Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <div style="margin-bottom: 10px;">
    <span><%=Resources.labels.language %></span>
    <asp:DropDownList runat="server" ID="cboLanguage" Width="100px" 
      OnSelectedIndexChanged="cboLanguage_SelectedIndexChanged" AutoPostBack="true">
    </asp:DropDownList>
  </div>
  <div class="settings">
    <dxwgv:ASPxGridView ID="ASPxGridViewEvents" runat="server"
          AutoGenerateColumns="False" KeyFieldName="EventId"
          SettingsEditing-Mode="Inline" 
          SettingsPager-Visible="true" 
          SettingsBehavior-ConfirmDelete="true"
          SettingsText-CommandCancel="<%$ Resources:labels, cmdCancel %>"
          SettingsText-ConfirmDelete="<%$ Resources:labels, cmdConfirmDelete %>"
          SettingsText-CommandUpdate="<%$ Resources:labels, cmdUpdate %>" 
          Width="1000px"
          OnHtmlRowPrepared="ASPxGridViewEvents_OnHtmlRowPrepared"
          OnRowDeleting="ASPxGridViewEvents_OnDeleting"
          OnRowUpdating="ASPxGridViewEvents_OnUpdating">
        <Settings ShowFilterRow="True"/>
        <Columns>
          <dxwgv:GridViewCommandColumn VisibleIndex="0" Width="100px">
            <EditButton Visible="True" Text="<%$ Resources:labels, cmdUpdate %>">
            </EditButton>
            <DeleteButton Visible="True" Text="<%$ Resources:labels, cmdDelete %>">
            </DeleteButton>
            <ClearFilterButton Visible="True" Text="<%$ Resources:labels, cmdClearFilter %>">
            </ClearFilterButton>
            <CancelButton Text="<%$ Resources:labels, cmdCancel %>">
            </CancelButton>
            <HeaderStyle HorizontalAlign="Center" />
          </dxwgv:GridViewCommandColumn>
          <dxwgv:GridViewDataHyperLinkColumn VisibleIndex="0" Width="70px" FieldName="EventId" Caption=" " 
            HeaderStyle-HorizontalAlign="Center" ReadOnly="true">
            <PropertiesHyperLinkEdit NavigateUrlFormatString="EditEvent.aspx?Id={0}"
              Text="<%$ Resources:labels, viewDetail %>">
            </PropertiesHyperLinkEdit>
          </dxwgv:GridViewDataHyperLinkColumn>
          <dxwgv:GridViewDataTextColumn Caption="ID" FieldName="EventId" Visible="false">
          </dxwgv:GridViewDataTextColumn>
          <dxwgv:GridViewDataTextColumn Caption="<%$ Resources:labels, title %>" 
            FieldName="Title" VisibleIndex="1">
            <PropertiesTextEdit>
              <ValidationSettings>
                <RequiredField ErrorText="<%$ Resources:labels, titleReqMsg %>" IsRequired="True" />
              </ValidationSettings>
            </PropertiesTextEdit>
            <HeaderStyle HorizontalAlign="Center" />
          </dxwgv:GridViewDataTextColumn>
          <dxwgv:GridViewDataDateColumn Caption="<%$ Resources:labels, dateModified %>" VisibleIndex="2" Width="150px"
            FieldName="DateModified" ReadOnly="true">
            <PropertiesDateEdit DisplayFormatString="G">
            </PropertiesDateEdit>
            <HeaderStyle HorizontalAlign="Center" />
          </dxwgv:GridViewDataDateColumn>
          <dxwgv:GridViewDataCheckColumn Caption="<%$ Resources:labels, approved %>" VisibleIndex="4" Width="50px"
            FieldName="IsPublished">
            <HeaderStyle HorizontalAlign="Center" />
          </dxwgv:GridViewDataCheckColumn>
        </Columns>
        <Settings ShowPreview="true"/>
        <SettingsPager Summary-Visible="true" AlwaysShowPager="true" Mode="ShowPager" PageSize="15">
          <Summary AllPagesText="<%$ Resources:labels, postsAllPagesText %>" Text="<%$ Resources:labels, postsPageText %>" />
        </SettingsPager>
    </dxwgv:ASPxGridView>
  </div>
</asp:Content>
